#{extends 'main.html' /}
#{if event.sprint}
<h2>
	<a style ="color:#400040;" href=" @{Projects.showProject(event.sprint.project.getEntityId())}">${event.sprint.project.name}</a> > 
	<a style ="color:#400040;" href=" @{Events.showSprints(event.sprint.project.getEntityId())}">Sprints</a> > 
	<a style ="color:#400040;" href="@{Events.showSprint(event.sprint.getEntityId())}">${event.sprint.name}</a> > 
	<a style ="color:#400040;" href="@{Events.showSprintEvents(event.sprint.getEntityId())}">Events</a> > 
	<a style ="color:#400040;" href="@{Events.showSprint(event.sprint.getEntityId())}">${event.name}</a> >
	Tasks
</h2><hr/>
#{/if}
#{else}
<h2>
	<a style ="color:#400040;" href="@{Projects.showProject(event.project.getEntityId())}">${event.project.name}</a> > 
	<a style ="color:#400040;" href="@{Events.showProjectEvents(event.project.getEntityId())}">Events</a> > 
	<a style ="color:#400040;" href="@{Events.showEvent(event.getEntityId())}">${event.name}</a> >
	Tasks
</h2><hr/>
#{/else}
<h3>Associate Tasks</h3>
#{form @Events.associateTasksToEvent(event.getEntityId()), id:'form'}
#{if oldTasks || newTasks}
	#{list items:oldTasks, as:'task'}
		&nbsp;&nbsp;<input name = "tasksIds" id = "tasksIds" type = "checkbox" checked="checked" value = "${task.getEntityId()}" /> ${task.description}
		<br/><br/>
	#{/list}
	#{list items:newTasks, as:'task'}
		&nbsp;&nbsp;<input name = "tasksIds" id = "tasksIds" type = "checkbox" value = "${task.getEntityId()}" /> ${task.description}
		<br/><br/>
	#{/list}
	<input type="submit" value="Submit"/>
	#{/if}
#{else}
	There are no tasks in this project!!
#{/else}
#{/form}
	
